home *** CD-ROM | disk | FTP | other *** search
/ Apple II Magazines (PO) / Nibble Volume 10, No. 10 (1989-10)(MindCraft Publishing)(Side A)[a].zip / Nibble Volume 10, No. 10 (1989-10)(MindCraft Publishing)(Side A)[a].po / TITLE.LOAD.S < prev    next >
Text File  |  1996-12-24  |  2KB  |  67 lines

  1. *-------------------------------------------------*
  2. *    GS.STARTUP SOURCE CODE -  By Peter Stubbs    *
  3. *    Copyright(c) 1989 MindCraft Publ. Corp.      *
  4. * This program will load and display a Super Res  *
  5. * title screen during the ProDOS 16 boot process  *
  6. *-------------------------------------------------*
  7. *              MERLIN 816 ASSEMBLER               *
  8. *-------------------------------------------------*
  9.  
  10.           REL            ;Tell Merlin - relocatable file
  11.           DSK PIC.LOAD.L ;assemble link file under this name
  12.  
  13. * Equates
  14.  
  15. PRODOS    EQU $E100A8
  16. OPEN      EQU $10
  17. READ      EQU $12
  18. CLOSE     EQU $14
  19.  
  20.           MX %00         ;Tel Merlin we're in 16 bits
  21.  
  22.           PHB            ;Save data bank
  23.           PHK            ;Move program bank
  24.           PLB            ; to data bank
  25.           JSL PRODOS
  26.           DA OPEN        ;Open BOOT.PIC
  27.           ADRL OPEN_PRM
  28.           BCS ERR        ;Exit if there was an error
  29.           LDA OPEN_PRM   ;Get REFNUM
  30.           STA READ_PRM   ;Store it in read
  31.           STA CLS_PRM    ; and close parm tables
  32.  
  33.           SEP #$20       ;8 bit accumulator
  34.           LDAL $E1C029   ;Read NEWVIDEO switch
  35.           ORA #%01000000 ;Turn on linear addressing
  36.           STAL $E1C029
  37.  
  38.           REP #$20       ;16 bit accumulator
  39.           JSL PRODOS
  40.           DA READ        ;Go read in $8000 bytes
  41.           ADRL READ_PRM
  42.           JSL PRODOS
  43.           DA CLOSE       ;Close BOOT.PIC
  44.           ADRL CLS_PRM
  45.  
  46.           SEP #$20       ;8 bit accumulator
  47.           LDAL $E1C029
  48.           ORA #%10000000 ;Turn on Super Res display
  49.           STAL $E1C029
  50.  
  51.           REP #$20       ;16 bit accumulator
  52. ERR       PLB            ;Restore bank
  53.           RTL            ;Exit to caller
  54.  
  55. OPEN_PRM  DA $0000       ;REFNUM - filled by ProDOS
  56.           ADRL PATHNAME  ;Pointer to pathname
  57.           ADRL $0000     ;I/O buffer - filled by ProDOS
  58.  
  59. READ_PRM  DA $0000       ;REFNUM - filled by program
  60.           ADRL $E12000   ;Data buffer - Super Res screen
  61.           ADRL $8000     ;Bytes to read ($8000 = whole pic)
  62.           ADRL $0000     ;Bytes read - filled by ProDOS
  63.  
  64. CLS_PRM   ADRL $0000     ;REFNUM - filled by program
  65.  
  66. PATHNAME  STR '*/SYSTEM/SYSTEM.SETUP/BOOT.PIC'
  67.